package cn.shop.utils.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author : 李一涵
 * @date : Created in 2021-11-10 15:13
 * @description : 订单状态
 */
public enum OrderStatus {

	/**
	 * 审核中
	 */
	AUDITING(0, "待审核"),
	REJECTED(1, "已退回"),
	PASSED(2, "出售中"),
	FROZEN(3, "已冻结"),
	TRADING(4, "交易中"),
	COMPLETED(5, "已完成"),
	SOLD_OUT(6,"已下架");

	@EnumValue
	private final int code;

	@JsonValue
	private final String description;

	OrderStatus(int code, String description) {
		this.code = code;
		this.description = description;
	}

	public int code() {
		return code;
	}

	public String description() {
		return description;
	}

}
